package com.itheima.pojo;

public class Student {
    private int id;

    public Student() {
        System.out.println("1、加载无参构造");
    }

    public void init() {
        System.out.println("3、init初始化");
    }

    public void distory() {
        System.out.println("5 、story 对象销毁");
    }

    public int getId() {
        System.out.println("4、对象调用getid");
        return id;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                '}';
    }

    public void setId(int id) {
        System.out.println("2、set id 赋值");
        this.id = id;
    }
}
